<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type="button" value="获取数据" onclick="getData()">
    <script>
        function getData() {
            // Promise.all([fetch('1.php?m=m1'), fetch('1.php?m=m2')]).then(res => {
            //     console.log(res);
            // })
            Promise.all([fetch('/m1').then(res=>res.text()), fetch('/m2').then(res=>res.text())]).then(res => {
                console.log(res);
            })
        }
    </script>
</body>

</html>